<div>
    <button onclick="loop()">loop</button>
</div>
<script>
/**
 * 手写ajax请求
 */
function ajax(url,fnSucc,fnFailed){
    //1,创建ajax对象
    if(window.XMLHttpRequest){
        var oAjax = new XMLHttpRequest();
    }else{
        var oAjax = ActiveXObject("Microsoft.XMLHTTP");
    }

    //2,连接服务器
    oAjax.open('POST',url,true);

    //3,发送
    oAjax.send();

    //4,接收
    oAjax.onreadystatechange = function (){
        if(oAjax.readyState == 4){
            if(oAjax.status == 200){
                //alert('成功了：'+oAjax.responseText);
                fnSucc(oAjax.responseText);
            }else{
                if(fnFailed){
                    fnFailed();
                }
            }
        }
    }
}

/**
 * 2,在for循环中发送post请求
 * 
 * 该信息报错,头有问题
 */
function loop(){
    var keys = ["ACCT_ROLL_IN_JXQ","XT_FUISSUER_LIST","XT_FUISSUER_LIST","XT_WHITE_LIST","DENY_OPENACCOUNT_TIME","OPEN_ACCOUNT_LOCATION_VALUES"]
    for (let index = 0; index < keys.length; index++) {
        var json = {
            "PARAMSTR":keys[index]
        }
        ajax("http://127.0.0.1:8099/DBANK3004/public/getParamValue.do",function (str){
            console.log(str);
        },function(){
            console.log("失败");
        });
    }
}
</script>